<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\View;
use App\Http\Controllers\Controller;
use App\Model\Category;


class CommonController extends Controller
{
    public function __construct(View $view)
    {
        //分类导航
        $categorys = Category::where('pid', 0)->get();
        View::share('categorys', $categorys);

    }
}
